<template>
	<view>
		<!-- <sidebar></sidebar> -->
		<view v-if="type==2" style="padding: 30rpx;">
			<u-parse :content="detail.yinsi"></u-parse>
		</view>
		<view v-else style="padding: 30rpx;">
			<u-parse :content="detail.xieyi"></u-parse>
		</view>
	</view>
</template>

<script>
	import sidebar from '@/components/sidebar.vue'
	export default {
		components: {
			sidebar
		},
		data() {
			return {
				type: 1,
				detail: {}
			}
		},
		onLoad(options) {
			this.type = options.type ?? 1
			if (this.type == 2) {
				uni.setNavigationBarTitle({
					title: this.$t('login.xieyi4')
				})
			} else {
				uni.setNavigationBarTitle({
					title: this.$t('login.xieyi2')
				})
			}
			this.init()
		},
		methods: {
			init() {
				this.$api('/User/xieyi').then(res => {
					this.detail = res
				})
			}
		}
	}
</script>

<style>

</style>